home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.0 / stk-3 / blt-for-STk-3.0 / blt-1.9 / man / barchart.man next >
Encoding:
Text File  |  1995-07-01  |  50.7 KB  |  1,304 lines

  1. '\"
  2. '\" Copyright 1991-1994 by AT&T Bell Laboratories.
  3. '\"
  4. '\" Permission to use, copy, modify, and distribute this software
  5. '\" and its documentation for any purpose and without fee is hereby
  6. '\" granted, provided that the above copyright notice appear in all
  7. '\" copies and that both that the copyright notice and warranty
  8. '\" disclaimer appear in supporting documentation, and that the
  9. '\" names of AT&T Bell Laboratories any of their entities not be used
  10. '\" in advertising or publicity pertaining to distribution of the
  11. '\" software without specific, written prior permission.
  12. '\"
  13. '\" AT&T disclaims all warranties with regard to this software, including
  14. '\" all implied warranties of merchantability and fitness.  In no event
  15. '\" shall AT&T be liable for any special, indirect or consequential
  16. '\" damages or any damages whatsoever resulting from loss of use, data
  17. '\" or profits, whether in an action of contract, negligence or other
  18. '\" tortuous action, arising out of or in connection with the use or
  19. '\" performance of this software.
  20. '\"
  21. '\" Barchart created by George Howlett.
  22. '\"
  23. .so man.macros
  24. .HS blt_barchart cmds
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. blt_barchart \- Create and manipulate barchart widgets
  29. .SH SYNOPSIS
  30. \fBblt_barchart\fI \fIpathName \fR?\fIoptions\fR?
  31. .SH "STANDARD OPTIONS"
  32. .LP
  33. .nf
  34. .ta 4c 8c 12c
  35. \fBbackground\fR    \fBcursor\fR    \fBforeground\fR        
  36. \fBborderWidth\fR    \fBfont\fR    \fBrelief\fR            
  37. .fi
  38. .LP
  39. See the ``options'' manual entry for details on the standard options.
  40. .ta 4c
  41. .SH "WIDGET-SPECIFIC OPTIONS"
  42. .LP
  43. .nf
  44. .ta 4c 8c 12c
  45. \fBbottomMargin\fR    \fBleftMargin\fR    \fBtitle\fR     
  46. \fBbufferElements\fR    \fBplotBackground\fR    \fBtopMargin\fR 
  47. \fBhalo\fR    \fBplotBorderWidth\fR    \fBwidth\fR     
  48. \fBheight\fR    \fBplotRelief\fR        
  49. \fBinvertxy\fR    \fBrightMargin\fR       
  50. .fi
  51. .BE
  52. .SH DESCRIPTION
  53. .PP
  54. The \fBblt_barchart\fR command creates a new window (given by the 
  55. \fIpathName\fR argument) and makes it into an barchart widget.
  56. Additional
  57. options, described above, may be specified on the command line
  58. or in the option database
  59. to configure aspects of the graph such as its colors and font.
  60. The \fBblt_barchart\fR command returns its
  61. \fIpathName\fR argument.  At the time this command is invoked,
  62. there must not exist a window named \fIpathName\fR, but
  63. \fIpathName\fR's parent must exist.
  64. .PP
  65. The \fBblt_barchart\fR widget plots two-variable data as
  66. rectangular bars in a window.  The x-coordinate values designate
  67. the position of the bar along the x-axis, while the y-coordinate
  68. values designate the magnitude.
  69. The \fBblt_barchart\fR has of several components; coordinate axes, 
  70. crosshairs, a legend, and a collection of elements and tags.
  71. .SS "COORDINATE AXES"
  72. The barchart widget has four axes, two standard (x and y) and two alternate
  73. (x2 and y2).  Graph elements and tags are mapped onto one x-axis and 
  74. one y-axis (by default, they are mapped onto the standard axes).
  75. .PP
  76. Each axis consists of the axis line and major and minor ticks placed 
  77. at set intervals.  At major ticks, labels (text strings) representing 
  78. the coordinate value of the tick are drawn.  By default, the tick labels 
  79. are simply numeric strings.  However, a Tcl procedure may be supplied 
  80. to format individually each tick label.
  81. .PP
  82. The scale of the axis is determined its minimum and maximum limits.
  83. By default, each axis is auto-scaled using the limits of the data.
  84. However either limit can be set to manually scale the graph.
  85. .SS "CROSSHAIRS"
  86. Crosshairs are a set of two lines (vertical and horizontal) which
  87. intersect on the graph.  They are implemented using XOR drawing
  88. primitives, so they do not require the graph to be redrawn when 
  89. they are moved or redisplayed.
  90. .SS "ELEMENTS"
  91. A graph element is a set of data points and configuration options 
  92. which determine how the bar is displayed in the window.  Elements 
  93. are created by the \fBelement create\fP widget command.  The configuration 
  94. options may be specified as the element is created or later by 
  95. the \fBelement configure\fR 
  96. widget command.  There is an internal display list of element names which 
  97. controls the drawing order of the elements. By default, elements are 
  98. appended to the display list as they are created.  The element display list
  99. can be managed by the \fBelement show\fR command.  
  100. .SS "LEGEND"
  101. The legend consists of a list of entries, where each entry is an element
  102. symbol and label.  By default, the legend is located in the right
  103. margin of the graph.  However, the legend may appear anywhere in the
  104. plotting area of the graph by specifying its window coordinates.
  105. .SS "TAGS"
  106. Tags are simple drawing procedures used to annotate or highlight
  107. areas of the graph. A tag may be either a text string, bitmap,
  108. line, window, or polygon.  A tag may be associated with a particular 
  109. element, so that the tag is displayed only if the element is 
  110. displayed.  Tags are the first items drawn when the graph is displayed, 
  111. so that elements, symbols, legend, and axes always appear in front of them.  
  112. .PP
  113. Tags differ from elements in that they do not affect the auto-scaling of 
  114. coordinate axes.  Furthermore, tags can have \fIelastic\fR coordinates
  115. (specified by \fC-Inf\fR and \fCInf\fR respectively) which translate into
  116. the axis minimum or maximum limit.  For example, to place a tag so it
  117. always remains in the lower left corner of the plot, use the coordinates
  118. \fC-Inf\fR,\fC-Inf\fR.
  119. .SH "WIDGET COMMANDS"
  120. .PP
  121. The \fBblt_barchart\fR command creates a new Tcl command whose
  122. name is \fIpathName\fR.  This
  123. command may be used to invoke various
  124. operations on the widget.  It has the general form:
  125. .DS C
  126. \fIpathName option \fR?\fIarg arg ...\fR?
  127. .DE
  128. \fIOption\fR and the \fIarg\fRs
  129. determine the exact behavior of the command.  The following
  130. commands are valid for \fBblt_barchart\fR widgets:
  131. .TP
  132. \fIpathName \fBconfigure \fR?\fIoptions...\fR?
  133. Queries or modifies the configuration options of the widget. 
  134. Valids options are described in
  135. .SB WIDGET OPTIONS.
  136. .TP
  137. \fIpathName \fBcrosshairs configure\fR ?\fIoptions...\fR?
  138. Queries or modifies the configuration options of the crosshairs.
  139. This command is similar to the \fBconfigure\fR command, except that it
  140. applies to the options of the crosshairs, whereas \fBconfigure\fR applies 
  141. to the options for the graph as a whole.  See 
  142. .SB CROSSHAIRS OPTIONS
  143. for a description of valid options.
  144. .TP
  145. \fIpathName \fBcrosshairs toggle\fR
  146. Toggles the current state of the crosshairs, turning them on or off.
  147. This command returns an empty string.
  148. .TP
  149. \fIpathName \fBelement append \fIname coords\fR
  150. Appends pairs of x,y data points to element \fIname\fR.  
  151. \fIcoords\fR is a list of numeric expressions (x,y graph coordinates) 
  152. representing data points.  It returns the empty string.
  153. .TP
  154. \fIpathName \fBelement configure \fIname \fR?\fIoptions...\fR?
  155. This command is similar to the \fBconfigure\fR command, except that it
  156. applies to the options of an individual element, whereas
  157. \fBconfigure\fR applies to the options for the graph as a whole.
  158. \fIOptions\fR may have any of the values accepted by the
  159. \fBelement create\fR widget command. See
  160. .SB ELEMENT OPTIONS
  161. for a description of valid options.
  162. .TP
  163. \fIpathName \fBelement create \fIname \fR?\fIoptions...\fR? 
  164. Creates a new element \fIname\fP in the graph.  Element names must be
  165. unique, so \fIname\fR can not already exist in the graph.  
  166. If additional arguments are present, they specify any of the 
  167. element options (see 
  168. .SB ELEMENT OPTIONS
  169. ).
  170. .TP
  171. \fIpathName \fBelement delete ?\fIname ...\fR?
  172. Deletes the element \fIname\fR from the graph.  
  173. Returns the empty string.
  174. .TP
  175. \fIpathName \fBelement names\fR
  176. Returns a list of all elements. This differs from
  177. \fBelement show\fR in that it returns the names of all elements, not
  178. just those in the element display list.
  179. .TP
  180. \fIpathName \fBelement show \fR?\fInames\fR?
  181. Queries or resets the element display list.  
  182. The element display
  183. list defines which elements are drawn and in what order.  
  184. \fINames\fR is a list of the elements to
  185. be displayed.  If there is no \fInames\fR argument, the list of elements 
  186. currently being displayed is returned.
  187. .TP
  188. \fIpathName \fBinvtransform \fIwinX winY\fP 
  189. Performs an inverse coordinate transformation, mapping x,y window 
  190. coordinates to graph coordinates (using the standard x and y axes).  
  191. Returns a list of containing the x and y graph coordinates.
  192. .TP
  193. \fIpathName \fBlegend activate \fIname...\fR
  194. .VS
  195. Specifies that the legend entries of the named elements should be drawn 
  196. with the active legend background and foreground colors.  The entries may 
  197. also be drawn with a different relief (using the \fB-activerelief\fR and 
  198. \fB-activeborderwidth\fR options).
  199. \fIName\fR is the name of an element in the graph.
  200. .VE
  201. .TP
  202. \fIpathName \fBlegend configure \fR?\fIoptions...\fR?
  203. This command is similar to the \fBconfigure\fR command, except that it
  204. applies to the options for the legend, whereas \fBconfigure\fR applies
  205. to the options for the graph as a whole.  See 
  206. .SB LEGEND OPTIONS
  207. for a description of valid options.  
  208. .TP
  209. \fIpathName \fBlegend deactivate \fIname...\fR
  210. .VS
  211. Specifies that the legend enties of the named elements should be drawn 
  212. with the legend background and foreground colors.  \fIName\fR is the 
  213. name of an element in the graph.
  214. .VE
  215. .TP
  216. \fIpathName \fBlegend get \fIstring\fR
  217. .VS
  218. Returns the name of the graph element at the current screen position
  219. in the legend.  \fIString\fR must be in the form "\fI@x,y\fR", where 
  220. \fIx\fR and \fIy\fR are the window coordinates.  If the given screen 
  221. coordinates do not lie over a legend entry, the empty string is returned.
  222. .VE
  223. .SB LEGEND OPTIONS
  224. for a description of valid options.  
  225. .TP
  226. \fIpathName \fBpostscript \fR?\fIfileName\fR? ?\fIoptions...\fR?
  227. Generates PostScript commands to print the graph. If no \fIfileName\fR
  228. argument is present, the PostScript output is returned. Otherwise,
  229. \fIfileName\fR is created and will contain the PostScript output.  In
  230. this case the empty string is returned.  If any \fIoption-value\fR
  231. pairs are present, they set configuration options controlling how the
  232. PostScript is generated. See 
  233. .SB POSTSCRIPT OPTIONS
  234. for a description of valid options.
  235. .TP
  236. \fIpathName \fBpsconfigure \fR?\fIoptions...\fR?
  237. Queries or modifies the options of the \fBpostscript\fR command
  238. (see
  239. .SB POSTSCRIPT OPTIONS
  240. ).
  241. .TP
  242. \fIpathName \fBtag after \fItagId\fR ?\fItagId\fR?
  243. Reorders the tag display list placing the first tag specified after
  244. the second.  If no second \fItagId\fR argument is specified, the tag
  245. is placed at the end of the list.  This command can be used to control
  246. how tags are displayed since tags are drawn in the order of this
  247. display list.  The empty string is returned.
  248. .TP
  249. \fIpathName \fBtag before \fItagId\fR ?\fItagId\fR?
  250. Reorders the tag display list placing the first tag specified before
  251. the second.  If no second \fItagId\fR argument is specified, the tag
  252. is placed at the beginning of the list.  This command can be used to
  253. control how tags are displayed since tags are drawn in the order of
  254. this display list.  The empty string is returned.
  255. .TP
  256. \fIpathName \fBtag configure \fItagId\fR ?\fIoptions...\fR? 
  257. Queries or modifies the configuration options of the particular tag.
  258. See 
  259. .SB TAG OPTIONS
  260. for a description of valid options.
  261. .TP
  262. \fIpathName \fBtag coords \fItagId\fR ?\fIcoords\fR? 
  263. Queries or resets the coordinates of the tag designated by
  264. \fItagId\fR.  If \fIcoords\fR is present, it is a list of coordinate pairs
  265. representing the points of the tag.  This list is used to re-position the tag.
  266. If the \fIcoords\fR argument is not present, the current list of
  267. coordinates for \fItagId\fR is returned.
  268. .TP
  269. \fIpathName \fBtag create \fItype\fR ?\fIcoords\fR? ?\fIoptions...\fR?
  270. Creates a tag of the selected type. \fIType\fR may be either
  271. \fCtext\fR, \fCline\fR, \fCbitmap\fR, \fCpolygon\fR, or \fCwindow\fR.
  272. \fIcoords\fR is a list of coordinate pairs of points used
  273. to position the tag.  See
  274. .SB TAG OPTIONS
  275. for a description of options are valid.  This command returns a
  276. unique tag identifier, which is used as the \fItagId\fR argument in
  277. other tag-related commands.
  278. .TP
  279. \fIpathName \fBtag delete \fItagId\fR ?\fItagId..\fR?
  280. Deletes each of the specified tags.  This command returns the empty string.
  281. .TP
  282. \fIpathName \fBtag ids\fR ?\fIpattern\fR? 
  283. Returns a list of IDs of tags created.  If \fIpattern\fR is supplied,
  284. only those tags whose IDs matching it will be returned.
  285. .TP
  286. \fIpathName \fBtag type \fItagId\fR 
  287. Returns the type of the tag given by \fItagId\fR, such as
  288. \fCLine\fR or \fCText\fR. 
  289. If \fItagId\fR is not a valid a tag identifier, the empty string is returned.
  290. .TP
  291. \fIpathName \fBtransform \fIx y\fP 
  292. .VS
  293. Transforms the graph coordinates into window coordinates, by mapping
  294. the \fIx\fR and \fIy\fR values onto the standard axes (x and y).
  295. Returns a list containing the x and y window coordinates.
  296. Please note that graph coordinates far outside of the axis range are 
  297. not guarenteed to be accurate.
  298. .VE
  299. .TP
  300. \fIpathName \fBxaxis configure\fR ?\fIoptions...\fR? 
  301. .TP
  302. \fIpathName \fByaxis configure\fR ?\fIoptions...\fR? 
  303. .TP
  304. \fIpathName \fBx2axis configure\fR ?\fIoptions...\fR? 
  305. .TP
  306. \fIpathName \fBy2axis configure\fR ?\fIoptions...\fR? 
  307. Queries or modifies the configuration options of the coordinate axis.  
  308. The subsection 
  309. .SB AXIS OPTIONS
  310. describes which options are valid.
  311. .TP
  312. \fIpathName \fBxaxis limits\fR
  313. .TP
  314. \fIpathName \fByaxis limits\fR
  315. .TP
  316. \fIpathName \fBx2axis limits\fR
  317. .TP
  318. \fIpathName \fBy2axis limits\fR
  319. Returns a list of two graph coordinates representing the minimum and maximum 
  320. limits of the x-axis.  The format of the list returned is \fCmin max\fR.
  321. .sp 1
  322. .SH "CONFIGURATION OPTIONS"
  323. .SS "WIDGET OPTIONS"
  324. The following widget options are valid for the \fBconfigure\fR command.  
  325. .DS
  326. \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
  327. .DE
  328. The \fBconfigure\fR command queries or modifies the configuration options 
  329. of the widget.  If no \fIoption\fR is specified, returns a list 
  330. describing all of the
  331. available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
  332. information on the format of this list).  
  333. If \fIoption\fR is specified with no \fIvalue\fR, then the command 
  334. returns a list describing the one named option (this list will be 
  335. identical to the corresponding sublist of the value returned if 
  336. no \fIoption\fR is specified).  If one or more \fIoption\-value\fR 
  337. pairs are specified, then the command
  338. modifies the given widget option(s) to have the given value(s); in
  339. this case the command returns the empty string.  
  340. .TP
  341. \fB\-bottommargin \fIpixels\fR
  342. Specifies the size of the margin from the x-coordinate axis to the 
  343. bottom of the window.  The x-axis title is displayed in this margin.  
  344. \fIPixels\fR may be specified in any of the forms described in 
  345. \fBTk_GetPixels\fR.  If \fIpixels\fR is less than one pixel, the 
  346. the margin size is selected automatically.
  347. .TP
  348. \fB\-bufferelements \fIboolean\fR
  349. .VS
  350. Specifies whether to use a pixmap to cache the display of elements.
  351. This is especially useful when there are many data points or the
  352. graph is redrawn frequently.  \fBoolean\fR is \fCtrue\fB by default.
  353. .VE
  354. .TP
  355. \fB\-halo \fIpixels\fR
  356. Specifies a threshold distance when searching for the closest data 
  357. point (see the \fBelement closest\fR command).  Only data points
  358. within this distance are considered in the search.
  359. \fIPixels\fR may be specified in any of the forms described in 
  360. \fBTk_GetPixels\fR.  If this option isn't specified, 
  361. it defaults to \fC0.5i\fR.
  362. .TP
  363. \fB\-height \fIpixels\fR
  364. Specifies a desired window height that the barchart widget should 
  365. request from its geometry manager.  The default height is \fC400\fR.
  366. .TP
  367. \fB\-invertxy \fIboolean\fR
  368. .VS
  369. Specifies that placement of the x and y axes should be inverted.
  370. If \fIboolean\fR is \fCtrue\fR, the x-axis is exchanged with the
  371. y-axis.  By default \fIboolean\fR is \fCfalse\fR.
  372. .VE
  373. .TP
  374. \fB\-leftmargin \fIpixels\fR
  375. Sets the size of the margin from the left edge of the window to the
  376. the y-coordinate axis.  The y-axis title is displayed in this
  377. margin.  If \fIpixels\fR is less than one pixel, 
  378. the margin size is selected automatically.
  379. .TP
  380. \fB\-plotbackground \fIcolor\fR
  381. Sets the background color of the plotting area.  
  382. .TP
  383. \fB\-plotborderwidth \fIpixels\fR
  384. Sets the width of the 3-D border to draw around the outside of
  385. the plotting area (if such border is being drawn; the \fBplotrelief\fR option
  386. determines this).  By default is the plot border width is \fC2\fR.
  387. .TP
  388. \fB\-plotrelief \fIstring\fR
  389. Specifies the 3-D effect desired for the plotting area.  
  390. \fIString\fR must be in a form accepted by \fBTk_GetRelief\fR. 
  391. It indicates how the interior of the plotting area should appear 
  392. relative to rest of the graph; for example, \fCraised\fR means the 
  393. plot should appear to protrude from the graph, relative to the surface 
  394. of the graph.  By default, the plot relief is \fCsunken\fR.
  395. .TP
  396. \fB\-rightmargin \fIpixels\fR
  397. Sets the size of marging from the plotting area to the right edge 
  398. of the window.  By default, the legend is displayed in this margin.  
  399. If \Ipixels\fR is than 1, the margin size
  400. is selected automatically.
  401. .TP
  402. \fB\-title \fIstring\fR
  403. Specifies the title of the graph.  If \fIstring\fR is the empty string 
  404. (the default), no title is displayed.
  405. .TP
  406. \fB\-topmargin \fIpixels\fR
  407. Sets the size of the marging the top edge of the window to the plotting area.
  408. The graph title is displayed in this margin.  
  409. If \fIpixels\fR is less than 1, the margin size is selected automatically.
  410. .TP
  411. \fB\-width \fIpixels\fR
  412. Specifies a desired window width that the barchart widget should
  413. request from its geometry manager.  
  414. \fIPixels\fR may be specified in any of the forms described 
  415. in \fBTk_GetPixels\fR.
  416. The default width is \fC400\fR.
  417. .sp 1
  418. .SS "AXIS OPTIONS"
  419. The following options are valid for the \fBxaxis configure\fR, 
  420. \fByaxis configure\fR, \fBx2axis configure\fR, 
  421. and the \fBy2axis configure\fR commands.  
  422. .DS
  423. \fIpathName \fBxaxis configure \fR?\fIoptions...\fR?
  424.  
  425. \fIpathName \fByaxis configure \fR?\fIoptions...\fR?
  426.  
  427. \fIpathName \fBx2axis configure \fR?\fIoptions...\fR?
  428.  
  429. \fIpathName \fBy2axis configure \fR?\fIoptions...\fR?
  430. .DE
  431. In addition, axis configuration options may be initialized by the
  432. \fBoption\fR command.  The name fields in the \fBblt_barchart\fR 
  433. option database are
  434. prefixed by \fCx\fR, \fCy\fR, \fCx2\fR, or \fCy2\fR while 
  435. the class fields are prefixed by \fCAxis\fR. The following example sets 
  436. the color of all axes to blue and the y-axis scale to logarithmic.
  437. .DS
  438. \fCoption add *Blt_barchart.AxisColor blue\fR
  439. \fCoption add *Blt_barchart.yLogscale true\fR
  440. .DE
  441. .TP
  442. \fB\-color \fIcolor\fR
  443. Sets the color of the axis and its labels.
  444. The default color is \fCblack\fR.
  445. .TP
  446. \fB\-command \fIprefix\fR
  447. Specifies a Tcl command to be invoked when formatting the axis labels.
  448. \fIPrefix\fR is typically just the name of a Tcl procedure, but the string
  449. may also contain extra arguments for the procedure.  When invoked, two
  450. arguments (the path name of the barchart widget and the numeric value of
  451. the axis label) are appended to the end of the command.  The procedure
  452. value should be a string representing the formatted label. If the value is
  453. the empty string or if \fIprefix\fR is the empty string, the default axis
  454. label is displayed.  Please note that this procedure is invoked during
  455. the display of the graph.  Resetting barchart configurations within this 
  456. procedure can cause unexpected results.
  457. .TP
  458. \fB\-descending \fIboolean\fR
  459. .VS
  460. Specifies whether the values along the axis are increasing or decreasing.  
  461. If \fIboolean\fR is true, the axis values will decrease.
  462. By default, the axis values increase.
  463. .VE
  464. .TP
  465. \fB\-font \fIfontName\fR 
  466. Specifies the font for axis labels. If
  467. \fIfontName\fR isn't specified then it defaults to
  468. \fC*-Courier-Bold-R-Normal-*-100-*\fR.
  469. .TP
  470. \fB\-linewidth \fIpixels\fR
  471. Set the line width of the axis and its ticks.  The default line
  472. width is \fC0\fR.
  473. .TP
  474. \fB\-logscale \fIboolean\fR
  475. Sets the scale of the coordinate axis (either logarithmically or
  476. linearly).  If \fIboolean\fR is \fCtrue\fR, the axis will be displayed
  477. in logarithmic scale.  \fIBoolean\fR must be a value accepted by
  478. \fBTcl_GetBoolean\fR.  By default, the scale is linear.
  479. .TP
  480. \fB\-loose \fIboolean\fR
  481. Indicates that when auto-scaling the axis, the axis range 
  482. should fit loosely around the data points at the outer tick intervals.  
  483. Otherwise the axis range fits tightly at the limits of the data displayed. 
  484. By default, the range is tight.
  485. .TP
  486. \fB\-mapped \fIboolean\fR
  487. .VS
  488. Specifies if the axis should be displayed. By default, the standard
  489. axes are displayed (x and y), but not the alternate (x2 and y2).
  490. .VE
  491. .TP
  492. \fB\-max \fIvalue\fR
  493. Sets the maximum limit of the axis.  Data points exceeding this
  494. limit are clipped at this value. If \fIvalue\fR is the empty string
  495. (the default), the axis is auto-scaled whereby the maximum limit is
  496. determined from the data points of the displayed elements.
  497. .TP
  498. \fB\-min \fIvalue\fR
  499. Sets the minimum limit of the axis. Data points less than this
  500. limit are clipped at this value.  If \fIvalue\fR is the empty string
  501. (the default), the axis is auto-scaled whereby the minimum limit is
  502. determined from the data points of the displayed elements.
  503. .TP
  504. \fB\-rotate \fItheta\fR
  505. Specifies the rotation of the axis labels.  \fITheta\fR is a
  506. real number representing the angle of rotation in degrees.
  507. The default rotation is \fC0.0\fR degrees.
  508. .TP
  509. \fB\-showticks \fIboolean\fR
  510. Indicates if axis ticks should be displayed. If \fIboolean\fR is
  511. \fCtrue\fR (the default), ticks are displayed.
  512. .TP
  513. \fB\-stepsize \fIvalue\fR
  514. Sets the step size between major axis ticks.  \fIValue\fR must be
  515. greater than zero and less than the axis range, or the requested step size 
  516. is ignored and the step size is automatically calculated based
  517. upon the element data points.
  518. .TP
  519. \fB\-subticks \fInumber\fR
  520. Sets the number of minor axis ticks to be displayed.  By default, the
  521. number of minor ticks is \fC5\fR.  If \fInumber\fR is zero, no subticks
  522. will be displayed.
  523. .TP
  524. \fB\-ticklength \fIpixels\fR
  525. .VS
  526. Sets the length of the ticks and subticks (subticks are one-half \fIpixels\fR).
  527. If \fIpixels\fR is negative, ticks will point towards the plot, instead
  528. of away from it.  The tick length is \fC0.1i\fR.  
  529. .VE
  530. .TP
  531. \fB\-title \fIstring\fR
  532. Sets the title of the axis. If \fIstring\fR is the
  533. empty string, no axis title will be displayed.  
  534. .sp 1
  535. .SS "CROSSHAIRS OPTIONS"
  536. .PP
  537. The following options are valid for the \fBcrosshair configure\fR command.
  538. .DS
  539. \fIpathName \fBcrosshairs configure\fR ?\fIoptions...\fR?
  540. .DE
  541. In addition, crosshairs configuration options may be initialized by the 
  542. \fBoption\fR command.  The name fields in the \fBblt_barchart\fR option database
  543. are prefixed by
  544. by \fCxhairs\fR and classfields are prefixed by \fCXhairs\fR. 
  545. The following example sets the line width of the crosshairs to \fC2\fR.
  546. .DS
  547. \fCoption add *Blt_barchart.xhairsLinewidth 2\fR
  548. .DE
  549. .TP
  550. \fB\-color \fIcolor\fR 
  551. .VS
  552. Sets the color of the crosshairs.  
  553. If this option isn't specified, then it defaults to \fCblack\fR.
  554. .VE
  555. .TP
  556. \fB\-dashes \fIdashes\fR
  557. Sets the dash style of the crosshairs. \fIdashes\fR
  558. is the number of alternatingly displayed pixels. If \fIdashes\fR is
  559. \fC0\fR (the default), the crosshairs will be drawn as a solid line. 
  560. .TP
  561. \fB\-linewidth \fIpixels\fR
  562. Set the line width of crosshairs.  The default line width is \fC0\fR.
  563. .TP
  564. \fB\-mapped \fIboolean\fR
  565. Specifies if the crosshairs should be displayed. By default, 
  566. the crosshairs are not displayed.  
  567. .TP
  568. \fB\-position \fIstring\fR
  569. Specifies the position of the crosshairs. \fIString\fR must be in the
  570. format "\fI@x,y\fR", where \fIx\fR and \fIy\fR 
  571. are window coordinates.  
  572. .sp 1
  573. .SS "ELEMENT OPTIONS"
  574. .PP
  575. The following options are valid for the \fBelement create\fR and 
  576. \fBelement configure\fR commands.
  577. \fIName\fR is the name of the element to be configured.
  578. .DS
  579. \fIpathName \fBelement create \fIname\fR ?\fIoptions...\fR?
  580.  
  581. \fIpathName \fBelement configure \fIname\fR ?\fIoptions...\fR?
  582. .DE
  583. In addition, element configuration options may be initialized by the 
  584. \fBoption\fR command.  The name fields in the \fBblt_barchart\fR 
  585. option database 
  586. are prefixed by \fCelem\fR. 
  587. The following example creates a 3D effect for bars by setting
  588. the relief and the borderwidth.
  589. .DS
  590. \fCoption add *Blt_barchart.elemBorderwidth 2\fR
  591. \fCoption add *Blt_barchart.Relief sunken\fR
  592. .DE
  593. .TP
  594. \fB\-background \fIcolor\fR
  595. Specifies the the fill color for the bar.
  596. The default background color is \fCwhite\fR.
  597. .TP
  598. \fB\-borderwidth \fIpixels\fR
  599. Sets the width of the 3-D border to draw around the outside of
  600. the bar (if such border is being drawn; the \fBrelief\fR option
  601. determines this).  \fIPixels\fR may be in any form accepted by
  602. \fBTk_GetPixel\fR.  By default is the legend border width is \fC2\fR.
  603. .TP
  604. \fB\-data \fIvalueList\fR
  605. Specifies the graph coordinates representing 
  606. the data points to be plotted.  \fIValueList\fR must be a list of valid
  607. numeric expressions.  It this option isn't specified, it defaults to
  608. the empty string.
  609. .TP
  610. \fB\-foreground \fIcolor\fR  
  611. Sets the foreground color of the bar.
  612. If multiple bar segments are used, \fIcolor\fR may be list of color
  613. names representing a palette colors from which each bar segments is drawn.  
  614. The default foreground color is \fCblack\fR.
  615. .TP
  616. \fB\-label \fIstring\fR
  617. Sets the element label.  Labels are displayed in the 
  618. legend next to the element symbol.  If \fIstring\fR is the empty 
  619. string, no legend entry will be displayed for the element.  By 
  620. default, the label is the name of the element.
  621. .TP
  622. \fB\-mapx \fItype\fR
  623. .VS
  624. Specifies which x-axis to map the element's x-coordinates onto.
  625. \fIType\fR must be either \fCx\fR, \fCx2\fR, or \fCboth\fR.  The default
  626. axis is \fCx\fR.
  627. .VE
  628. .TP
  629. \fB\-mapy \fItype\fR
  630. .VS
  631. Specifies which y-axis to map the element's y-coordinates onto.
  632. \fIType\fR must be either \fCy\fR, \fCy2\fR, or \fCboth\fR.  The default
  633. axis is \fCy\fR.
  634. .VE
  635. .TP
  636. \fB\-relief \fIstring\fR
  637. Specifies the 3-D effect desired for the bar.  \fIString\fR may be any 
  638. value accepted by \fBTk_GetRelief\fR.  It indicates how
  639. the bar should appear relative to the graph; for
  640. example, \fCraised\fR means the bar should appear to protrude from
  641. the graph, relative to the surface of the graph.  By default, the
  642. legend relief is \fCraised\fR.
  643. .TP
  644. \fB\-stacked \fIboolean\fR
  645. Indicates how the bar should be displayed if it has multiple 
  646. y data points.  If \fIboolean\fR is \fCtrue\fR (the default), the bar
  647. is drawn in segments, one upon the other.
  648. .TP
  649. \fB\-stipple \fIbitmap\fR
  650. Specifies a stipple pattern with which to draw the bar. \fIBitmap\fR is
  651. the name of a bitmap in a form accepted by \fBTk_GetBitmap\fR.
  652. If multiple bar segments are used, \fIbitmap\fR may also be list of bitmap
  653. names representing a palette of stipples from which each bar segments is 
  654. drawn.  If a bitmap name is the empty string (the default) then the bar
  655. is drawn in a solid fashion.
  656. .TP
  657. \fB\-xdata \fIvalue\fR
  658. Specifies the x-coordinate of the bar element.
  659. \fIValue\fR must be a valid numeric expression.  It this 
  660. option isn't specified, it defaults to the empty string.
  661. .TP
  662. \fB\-ydata \fIvalueList\fR
  663. Specifies the y-coordinates of the data points to be plotted.  
  664. \fIValueList\fR must be a valid list of numeric expressions.  It this 
  665. option isn't specified, it defaults to the empty string.
  666. .sp 1
  667. .SS "LEGEND OPTIONS"
  668. The following options are valid for the \fBlegend configure\fR command.
  669. .DS
  670. \fIpathName \fBlegend configure \fR?\fIoptions...\fR?
  671. .DE
  672. In addition, legend configuration options may be initialized by the
  673. \fBoption\fR command.  The name fields in the \fBblt_barchart\fR 
  674. option database are
  675. prefixed by \fClegend\fR.  The following example initializes the
  676. legend foreground color to blue in the option database.
  677. .DS
  678. \fCoption add *Blt_barchart.legendForeground blue\fR
  679. .DE
  680. .TP
  681. \fB\-activebackground \fIcolor\fR
  682. .VS
  683. Sets the active background color of the legend.  All legend entries
  684. marked as active (see \fBlegend activate\fR command) are drawn with
  685. this background color.
  686. .VE
  687. .TP
  688. \fB\-activeborderwidth \fIpixels\fR
  689. .VS
  690. Sets the width of the 3-D border to draw around the outside of
  691. the each active legend entry (if such border is being drawn; 
  692. the \fB-activerelief\fR option determines this).  By default is the 
  693. active border width is \fC2\fR.
  694. .VE
  695. .TP
  696. \fB\-activeforeground \fIcolor\fR
  697. .VS
  698. Sets the active foreground color of the legend.  All legend entries
  699. marked as active (see \fBlegend activate\fR command) are drawn with
  700. this foreground color.
  701. .VE
  702. .TP
  703. \fB\-activerelief \fIstring\fR
  704. .VS
  705. Specifies the 3-D effect desired for active legend entries.  \fIString\fR 
  706. must be in a form accepted by \fBTk_GetRelief\fR. 
  707. It indicates how  the interior of the entry should appear relative to 
  708. the legend; for
  709. example, \fCraised\fR means the entry should appear to protrude from
  710. the legend, relative to the surface of the legend.  By default, the
  711. active legend relief is \fCflat\fR.
  712. .VE
  713. .TP
  714. \fB\-anchor \fIanchorPos\fR
  715. Tells how to position the legend relative to the positioning point for
  716. the legend; \fIanchorPos\fR may have any of the forms accepted by
  717. \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR is \fCcenter\fR
  718. then the legend is centered on the point; if \fIanchorPos\fR is
  719. \fCn\fR then the legend will be drawn such that the top center point
  720. of the rectangular region occupied by the legend will be at the
  721. positioning point.  This option defaults to \fCcenter\fR.
  722. .TP
  723. \fB\-background \fIcolor\fR
  724. Sets the background color of the legend. 
  725. If \fIcolor\fR is the empty string, no background rectangle will be drawn.
  726. .TP
  727. \fB\-borderwidth \fIpixels\fR
  728. Sets the width of the 3-D border to draw around the outside of
  729. the legend (if such border is being drawn; the \fBrelief\fR option
  730. determines this).  By default is the legend border width is \fC2\fR.
  731. .TP
  732. \fB\-font \fIfontName\fR 
  733. \fIFontName\fR specifies a font to use when drawing the labels of each
  734. element into the legend.  If this option isn't specified then it
  735. defaults to \fC*-Helvetica-Bold-R-Normal-*-120-*\fR.
  736. .TP
  737. \fB\-foreground \fIcolor\fR 
  738. Sets the foreground color of the element labels in the legend.  
  739. If this option isn't specified, then it defaults to \fCblack\fR.
  740. .TP
  741. \fB\-ipadx \fIpixels\fR
  742. .VS
  743. Sets the internal padding to the width of the legend. 
  744. Padding will be added to both the left and right and
  745. between the elements symbol and label.
  746. By default is the legend border width is \fC2\fR.
  747. .VE
  748. .TP
  749. \fB\-ipady \fIpixels\fR
  750. .VS
  751. Sets the internal padding to the height of the legend. 
  752. Padding will be added to both the top and bottom and
  753. between the elements labels.
  754. By default is the legend border width is \fC2\fR.
  755. .VE
  756. .TP
  757. \fB\-mapped \fIboolean\fR
  758. Indicates if the legend should be displayed. If \fIboolean\fR is
  759. \fCtrue\fR (the default), the legend will be mapped.  
  760. .TP
  761. \fB\-padx \fIpixels\fR
  762. .VS
  763. Specifies extra padding on the left and right of the legend.
  764. The default is \fC4\fR.
  765. .VE
  766. .TP
  767. \fB\-pady \fIpixels\fR
  768. .VS
  769. Specifies extra padding on the top and bottom of the legend.
  770. The default is \fC0\fR.
  771. .VE
  772. .TP
  773. \fB\-position \fIstring\fR
  774. Sets the positioning point of the legend in window coordinates.
  775. This option in conjunction with the \fB-anchor\fR option, determines
  776. where the legend is positioned. The format of \fIstring\fR is
  777. "\fI@x,y\fR", where \fIx\fR and \fIy\fR are the window coordinate
  778. values.  If \fIstring\fR is the empty string (the default), the legend
  779. will be displayed in the right margin (which is automatically extended
  780. to accommodate the legend).
  781. .TP
  782. \fB\-relief \fIstring\fR
  783. Specifies the 3-D effect desired for the legend.  \fIString\fR must be
  784. in a form accepted by \fBTk_GetRelief\fR. 
  785. It indicates how  the interior of the legend should appear relative to 
  786. the graph; for
  787. example, \fCraised\fR means the legend should appear to protrude from
  788. the graph, relative to the surface of the graph.  By default, the
  789. legend relief is \fCsunken\fR.
  790. .sp 1
  791. .SS "TAG OPTIONS"
  792. .PP
  793. The following options are valid for the \fBtag create\fR and \fBtag configure\fR commands.  
  794. \fITagid\fR is the identifier returned by the \fBtag create\fR command.
  795. .DS
  796. \fIpathName \fBtag create \fItype\fR ?\fIcoords\fR? ?\fIoptions...\fR?
  797.  
  798. \fIpathName \fBtag configure \fItagId\fR ?\fIoptions...\fR?
  799. .DE
  800. Tag configuration options may be initialized by the
  801. \fBoption\fR command.  The name fields in the \fBblt_barchart\fR
  802. option database are
  803. prefixed by \fCbmTag\fR, \fCtextTag\fR, \fClineTag\fR,
  804. \fCpolyTag\fR, or \fCwinTag\fR with respect to the tag type.
  805. Class fields are prefixed by \fCTag\fR. The following example sets
  806. the background color of all tags to blue and the foreground color of
  807. all text tags to white.
  808. .DS
  809. \fCoption add *Blt_barchart.TagBackground blue\fR
  810. \fCoption add *Blt_barchart.textTagForeground white\fR
  811. .DE
  812. The description of tag options is broken into subsections for each tag type.
  813. .sp 1
  814. .SS "TEXT TAGS"
  815. A text tag displays a string of characters on a single line.  They may
  816. be used to annotate regions of the graph.  Text tags are
  817. created with the following widget command:
  818. .DS
  819. \fIpathName \fBtag create text \fR?\fIcoords\fR? ?\fIoptions...\fR?
  820. .DE
  821. The argument \fIcoords\fR specifies a list of two numeric
  822. expressions representing the graph coordinates of a point 
  823. used to position the text on the graph. 
  824. .P
  825. After the coordinate list there may be any number of
  826. \fIoption\fR-\fIvalue\fR pairs, each of which sets one of the
  827. configuration options for the tag.  These same
  828. \fIoption\fR\-\fIvalue\fR pairs may be used in the \fBtag configure\fR
  829. command to change the tag's configuration.  The following
  830. options are supported for text tags:
  831. .TP
  832. \fB\-anchor \fIanchorPos\fR
  833. \fIAnchorPos\fR tells how to position the text relative to the
  834. positioning point for the text; it may have any of the forms accepted
  835. by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR is
  836. \fCcenter\fR then the text is centered on the point; if
  837. \fIanchorPos\fR is \fCn\fR then the text will be drawn such that the
  838. top center point of the rectangular region occupied by the text will
  839. be at the positioning point.  This option defaults to \fCcenter\fR.
  840. .TP
  841. \fB\-background \fIcolor\fR
  842. Sets the background color of the text string.  
  843. If \fIcolor\fR is the empty string, the background will be transparent.
  844. If this option isn't specified then it defaults to \fCwhite\fR.
  845. .TP
  846. \fB\-font \fIfontName\fR
  847. Specifies the text font.
  848. If this option isn't specified, it defaults 
  849. \fC*-Helvetica-Bold-R-Normal-*-120-*\fR.
  850. .TP
  851. \fB\-foreground \fIcolor\fR
  852. Sets the foreground color of the text.  
  853. If this option isn't specified then it defaults to \fCblack\fR.
  854. .TP
  855. \fB\-element \fIname\fR
  856. Associates the tag with the element \fIname\fR.  If \fIname\fR is not
  857. the empty string (the default), the tag is displayed only if
  858. \fIname\fR exists and is currently being displayed (see \fBelement show\fR).
  859. .TP
  860. \fB\-mapx \fItype\fR
  861. .VS
  862. Specifies which x-axis to map the tag's x-coordinates onto.
  863. \fIType\fR must be either \fCx\fR, \fCx2\fR, or \fCboth\fR.  The default
  864. axis is \fCx\fR.
  865. .VE
  866. .TP
  867. \fB\-mapy \fItype\fR
  868. .VS
  869. Specifies which y-axis to map the tag's y-coordinates onto.
  870. \fIType\fR must be either \fCy\fR, \fCy2\fR, or \fCboth\fR.  The default
  871. axis is \fCy\fR.
  872. .VE
  873. .TP
  874. \fB\-rotate \fItheta\fR
  875. Specifies how the tag is rotated.
  876. \fITheta\fR is a real number representing the angle of rotation in degrees.
  877. The tag is first rotated along its center and is then displayed according 
  878. to its
  879. anchor position. The default rotation is \fC0.0\fR degrees.
  880. .TP
  881. \fB\-text \fIstring\fR
  882. Sets the text string.  The exact way
  883. in which the text string is displayed may be affected by other options
  884. such as \fB-anchor\fR or \fB-rotate\fR.  This option defaults to the
  885. empty string.
  886. .TP
  887. \fB\-xoffset \fIpixels\fR
  888. Specifies a x-coordinate offset (in window coordinates) from the
  889. specified position.  
  890. .TP
  891. \fB\-yoffset \fIpixels\fR
  892. Specifies a y-coordinate offset (in window coordinates) from the
  893. specified position.  
  894. .sp 1
  895. .SS "LINE TAGS"
  896. A line tag displays one or more connected line segments on the graph.
  897. Line tags are created with widget commands in the form:
  898. .DS
  899. \fIpathName \fBtag create line \fR?\fIcoords\fR? ?\fIoptions...\fR?
  900. .DE
  901. The argument \fIcoords\fR specifies a list of numeric
  902. expressions representing the graph coordinate pairs of the points 
  903. connecting the line.
  904. .P
  905. After the \fIcoords\fR there may be any number of \fIoption\fR-\fIvalue\fR
  906. pairs, each of which sets one of the configuration options
  907. for the tag.  These same \fIoption\fR\-\fIvalue\fR pairs may be
  908. used in the \fBtag configure\fR command to change the tag's
  909. configuration.
  910. The following options are supported for line tags:
  911. .TP
  912. \fB\-background \fIcolor\fR
  913. Sets the background color of the line.
  914. The is only meaningful when used with
  915. the \fB-stipple\fR option.  
  916. If this option isn't specified then it defaults to \fCwhite\fR.
  917. .TP
  918. \fB\-dashes \fIdashes\fR
  919. Sets the dash style of the line. \fIDashes\fR
  920. is the number of alternatingly displayed pixels. If \fIdashes\fR is
  921. \fC0\fR (the default), the tag will be drawn as a solid line. 
  922. .TP
  923. \fB\-element \fIname\fR
  924. Associates the tag with the element \fIname\fR.  The tag is displayed
  925. only if an element \fIname\fR exists and is currently displayed (see
  926. \fBelement show\fR).  If \fIname\fR is the empty
  927. string (the default), the tag is displayed.
  928. .TP
  929. \fB\-foreground \fIcolor\fR
  930. Sets the foreground color.
  931. If this option isn't specified then it defaults to \fCblack\fR.
  932. .TP
  933. \fB\-linewidth \fIpixels\fR
  934. Sets the width of the lines.
  935. The default width is \fC0\fR.
  936. .TP
  937. \fB\-mapx \fItype\fR
  938. .VS
  939. Specifies which x-axis to map the tag's x-coordinates onto.
  940. \fIType\fR must be either \fCx\fR, \fCx2\fR, or \fCboth\fR.  The default
  941. axis is \fCx\fR.
  942. .VE
  943. .TP
  944. \fB\-mapy \fItype\fR
  945. .VS
  946. Specifies which y-axis to map the tag's y-coordinates onto.
  947. \fIType\fR must be either \fCy\fR, \fCy2\fR, or \fCboth\fR.  The default
  948. axis is \fCy\fR.
  949. .VE
  950. .TP
  951. \fB\-stipple \fIbitmap\fR
  952. Indicates that the line should be drawn with a stippled pattern rather
  953. than solid; \fIbitmap\fR specifies the stipple pattern to use, may be
  954. in any of the forms accepted by \fBTk_GetBitmap\fR.  If \fIbitmap\fR is 
  955. the empty string (the default) then the line is drawn in a solid fashion.
  956. .TP
  957. \fB\-xoffset \fIpixels\fR
  958. Specifies an offset in the x-coordinate direction
  959. (in window coordinates) from the specified position.
  960. The default offset ifs \fC0\fR.
  961. .TP
  962. \fB\-yoffset \fIpixels\fR
  963. Specifies an offset in the y-coordinate direction
  964. (in window coordinates) from the specified position.
  965. The default offset ifs \fC0\fR.
  966. .sp 1
  967. .SS "BITMAP TAGS"
  968. A bitmap tag displays a bitmap on the graph.  Bitmap tags are
  969. created with widget commands in the form:
  970. .DS
  971. \fIpathName \fBtag create bitmap \fR?\fIcoords\fR? ?\fIoptions...\fR?
  972. .DE
  973. The argument \fIcoords\fR specifies a list containing the graph
  974. coordinates of a point used to position the bitmap on the display.
  975. After the coordinate list there may be any number of \fIoption\fR-\fIvalue\fR
  976. pairs, each of which sets one of the configuration options
  977. for the tag.  These same \fIoption\fR\-\fIvalue\fR pairs may be
  978. used in the \fBtag configure\fR command to change the tag's
  979. configuration.
  980. The following options are supported for bitmap tags:
  981. .TP
  982. \fB\-anchor \fIanchorPos\fR
  983. \fIAnchorPos\fR tells how to position the bitmap relative to the
  984. positioning point for the bitmap;  it may have any of the forms
  985. accepted by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR
  986. is \fCcenter\fR then the bitmap is centered on the point;  if
  987. \fIanchorPos\fR is \fCn\fR then the bitmap will be drawn such that
  988. the top center point of the rectangular region occupied by the
  989. bitmap will be at the positioning point.
  990. This option defaults to \fCcenter\fR.
  991. .TP
  992. \fB\-background \fIcolor\fR
  993. Sets the background color of the bitmap.
  994. If \fIcolor\fR is the empty string,
  995. the background color will be transparent.
  996. The default background color is \fCwhite\fR.
  997. .TP
  998. \fB\-foreground \fIcolor\fR
  999. Sets the foreground color of the bitmap.  
  1000. The default foreground color is \fCblack\fR.
  1001. .TP
  1002. \fB\-bitmap \fIbitmap\fR
  1003. Specifies the bitmap to be displayed.
  1004. \fIBitmap\fR may have any of the forms accepted by \fBTk_GetBitmap\fR.
  1005. If \fIbitmap\fR is the empty string (the default), the tag will not be
  1006. displayed.
  1007. .TP
  1008. \fB\-element \fIname\fR
  1009. Associates the tag with the element \fIname\fR.  
  1010. If \fIname\fR is not the empty string (the default), the tag is displayed 
  1011. only if \fIname\fR exists and is being plotted
  1012. (see \fBelement show\fR).  
  1013. .TP
  1014. \fB\-mapx \fItype\fR
  1015. .VS
  1016. Specifies which x-axis to map the tag's x-coordinates onto.
  1017. \fIType\fR must be either \fCx\fR, \fCx2\fR, or \fCboth\fR.  The default
  1018. axis is \fCx\fR.
  1019. .VE
  1020. .TP
  1021. \fB\-mapy \fItype\fR
  1022. .VS
  1023. Specifies which y-axis to map the tag's y-coordinates onto.
  1024. \fIType\fR must be either \fCy\fR, \fCy2\fR, or \fCboth\fR.  The default
  1025. axis is \fCy\fR.
  1026. .VE
  1027. .TP
  1028. \fB\-rotate \fItheta\fR
  1029. Sets the rotation of the bitmap.
  1030. \fITheta\fR is a
  1031. real number representing the angle of rotation in degrees.
  1032. The tag is first rotated and then placed according to its anchor position.
  1033. The default rotation is \fC0.0\fR.
  1034. .TP
  1035. \fB\-xoffset \fIpixels\fR
  1036. Specifies an offset in the x-coordinate direction
  1037. (in window coordinates) from the specified position.
  1038. The default offset is \fC0\fR.
  1039. .TP
  1040. \fB\-yoffset \fIpixels\fR
  1041. Specifies an offset in the y-coordinate direction
  1042. (in window coordinates) from the specified position.
  1043. The default offset is \fC0\fR.
  1044. .sp 1
  1045. .SS "POLYGON TAGS"
  1046. A polygon tag displays a closed region described as two or more 
  1047. connected line segments on the graph. 
  1048. Polygon tags are created with the widget command:
  1049. .DS
  1050. \fIpathName \fBtag create polygon \fR?\fIcoords\fR? ?\fIoptions...\fR?
  1051. .DE
  1052. The argument \fIcoords\fR specifies a list of numeric
  1053. expressions representing graph coordinates which
  1054. describe the closed polygon.
  1055. It is assumed the first and last points are connected.
  1056. .P
  1057. After the coordinate list there may be any number of \fIoption\fR-\fIvalue\fR
  1058. pairs, each of which sets one of the configuration options
  1059. for the tag.  These same \fIoption\fR\-\fIvalue\fR pairs may be
  1060. used in the \fBtag configure\fR command to change the tag's
  1061. configuration.
  1062. The following options are supported for polygon tags:
  1063. .TP
  1064. \fB\-background \fIcolor\fR
  1065. Sets the background color of the polygon.  The default background color 
  1066. is \fCwhite\fR.  If \fIcolor\fR is the empty string, no background color
  1067. .TP
  1068. \fB\-dashes \fIdashes\fR
  1069. .VS
  1070. Sets the dash style of the outline around the polygon. \fIDashes\fR
  1071. is the number of alternatingly displayed pixels. If \fIdashes\fR is
  1072. \fC0\fR (the default), the outline will be drawn as a solid line. 
  1073. .VE
  1074. .TP
  1075. \fB\-element \fIname\fR
  1076. Associates the tag with the element \fIname\fR.  
  1077. If \fIname\fR is not the empty string (the default), the tag is displayed 
  1078. only if \fIname\fR exists and is currently being displayed
  1079. (see \fBelement show\fR).
  1080. .TP
  1081. \fB\-foreground \fIcolor\fR
  1082. Sets the foreground color of the polygon.  
  1083. The default foreground color is \fCblack\fR.
  1084. .TP
  1085. \fB\-linewidth \fIpixels\fR
  1086. .VS
  1087. Sets the width of the outline of the polygon. If \fIpixels\fR is zero, 
  1088. no outline
  1089. is drawn. The default width is \fC0\fR.
  1090. .VE
  1091. .TP
  1092. \fB\-mapx \fItype\fR
  1093. .VS
  1094. Specifies which x-axis to map the tag's x-coordinates onto.
  1095. \fIType\fR must be either \fCx\fR, \fCx2\fR, or \fCboth\fR.  The default
  1096. axis is \fCx\fR.
  1097. .VE
  1098. .TP
  1099. \fB\-mapy \fItype\fR
  1100. .VS
  1101. Specifies which y-axis to map the tag's y-coordinates onto.
  1102. \fIType\fR must be either \fCy\fR, \fCy2\fR, or \fCboth\fR.  The default
  1103. axis is \fCy\fR.
  1104. .VE
  1105. .TP
  1106. \fB\-stipple \fIbitmap\fR
  1107. Indicates that the polygon should be drawn with a stippled pattern
  1108. rather than a solid color;
  1109. \fIbitmap\fR specifies the stipple pattern to use, in any of the
  1110. forms accepted by \fBTk_GetBitmap\fR.
  1111. If \fIbitmap\fR is the empty string (the default), then the polygon
  1112. is filled with a solid (foreground) color.
  1113. .TP
  1114. \fB\-xoffset \fIpixels\fR
  1115. Specifies an x-coordinate offset (in window coordinates)
  1116. from the specified position.  
  1117. The default offset is \fC0\fR.
  1118. .TP
  1119. \fB\-yoffset \fIpixels\fR
  1120. Specifies a y-coordinate offset (in window coordinates)
  1121. from the specified position. 
  1122. The default is offset \fC0\fR.
  1123. .sp 1
  1124. .SS "WINDOW TAGS"
  1125. A window tag displays a particular window at a given position on the graph.
  1126. Window tags are created with the widget command:
  1127. .DS
  1128. \fIpathName \fBtag create window \fR?\fIcoords\fR? ?\fIoptions...\fR?
  1129. .DE
  1130. The argument \fIcoords\fR specifies a list containing the graph
  1131. coordinates of a point used to position the window on the display 
  1132. After \fIcoords\fR, there may be any number of \fIoption\fR-\fIvalue\fR
  1133. pairs, each of which sets one of the configuration options
  1134. for the tag.  These same \fIoption\fR\-\fIvalue\fR pairs may be
  1135. used in the \fBtag configure\fR command to change the tag's
  1136. configuration.
  1137. The following options are supported for window tags:
  1138. .TP
  1139. \fB\-anchor \fIanchorPos\fR
  1140. \fIAnchorPos\fR tells how to position the window relative to the
  1141. positioning point for the window;  it may have any of the forms
  1142. accepted by \fBTk_GetAnchor\fR.  For example, if \fIanchorPos\fR
  1143. is \fCcenter\fR then the window is centered on the point;  if
  1144. \fIanchorPos\fR is \fCn\fR then the window will be displayed such that
  1145. the top center point of the rectangular region occupied by the
  1146. window will be at the positioning point.
  1147. This option defaults to \fCcenter\fR.
  1148. .TP
  1149. \fB\-element \fIname\fR
  1150. Associates the tag with the element \fIname\fR.  
  1151. If \fIname\fR is not the empty string, the tag is displayed 
  1152. only if \fIname\fR exists and is currently being displayed 
  1153. (see \fBelement show\fR).  
  1154. This option defaults to the empty string.
  1155. .TP
  1156. \fB\-height \fIpixels\fR
  1157. Specifies the height to assign to the tag's window.
  1158. If this option isn't specified, or if it is specified as the empty
  1159. string, then the window is given whatever height it requests internally.
  1160. .TP
  1161. \fB\-mapx \fItype\fR
  1162. .VS
  1163. Specifies which x-axis to map the tag's x-coordinates onto.
  1164. \fIType\fR must be either \fCx\fR, \fCx2\fR, or \fCboth\fR.  The default
  1165. axis is \fCx\fR.
  1166. .VE
  1167. .TP
  1168. \fB\-mapy \fItype\fR
  1169. .VS
  1170. Specifies which y-axis to map the tag's y-coordinates onto.
  1171. \fIType\fR must be either \fCy\fR, \fCy2\fR, or \fCboth\fR.  The default
  1172. axis is \fCy\fR.
  1173. .VE
  1174. .TP
  1175. \fB\-width \fIpixels\fR
  1176. Specifies the width to assign to the tag's window.
  1177. If this option isn't specified, or if it is specified as the empty
  1178. string, then the window is given whatever width it requests internally.
  1179. .TP
  1180. \fB\-window \fIpathName\fR
  1181. Specifies the window to be managed by the graph.
  1182. The window specified by \fIpathName\fR must be a child of
  1183. the \fBblt_barchart\fR widget.
  1184. .TP
  1185. \fB\-xoffset \fIpixels\fR
  1186. Specifies an x-coordinate offset (in window coordinates)
  1187. from the specified position. 
  1188. The default offset is \fC0\fR.
  1189. .TP
  1190. \fB\-yoffset \fIpixels\fR
  1191. Specifies a y-coordinate offset (in window coordinates)
  1192. from the specified position.  
  1193. The default offset is \fC0\fR.
  1194. .sp 1
  1195. .SS "POSTSCRIPT OPTIONS"
  1196. The following options are valid for configuring PostScript output using either 
  1197. the \fBpostscript\fR or the \fBpsconfigure\fR command. 
  1198. .DS
  1199. \fIpathName \fBpostscript \fR?\fIfileName\fR? \fIoptions...\fR?
  1200.  
  1201. \fIpathName \fBpsconfigure ?\fIoptions...\fR?
  1202. .DE
  1203. .TP
  1204. \fB\-colormap \fIvarName\fR
  1205. \fIVarName\fR must be the name of a global array variable
  1206. that specifies a color mapping from the X color name to PostScript.
  1207. Each element of \fIvarName\fR must consist of PostScript
  1208. code to set a particular color value (e.g. ``\fC1.0 1.0 0.0 setrgbcolor\fR'').
  1209. When outputting color information in PostScript, it checks
  1210. to see if there is an element of \fIvarName\fR with the same
  1211. name as the color. If so, it uses the value of the element as the 
  1212. PostScript command to set the color.
  1213. If this option hasn't been specified, or if there isn't an entry
  1214. in \fIvarName\fR for a given color, then it uses the red, green,
  1215. and blue intensities from the X color.
  1216. .TP
  1217. \fB\-colormode \fImode\fR
  1218. Specifies how to output color information.  \fIMode\fR must be either
  1219. \fBcolor\fR (for full color output), \fCgray\fR (convert all colors
  1220. to their gray-scale equivalents) or \fCmono\fR (convert foreground colors
  1221. to black and background colors to white).  The default mode is \fCcolor\fR.
  1222. .TP
  1223. \fB\-fontmap \fIvarName\fR
  1224. \fIVarName\fR must be the name of a global array variable
  1225. that specifies a font mapping from the X font name to PostScript.
  1226. Each element of \fIvarName\fR must consist of a Tcl list with
  1227. one or two elements, which are the name and point size of a PostScript font.
  1228. When outputting PostScript commands for a particular font, Tk
  1229. checks to see if \fIvarName\fR contains an element with the same
  1230. name as the specified font. 
  1231. If there is such an element, then the font information contained in
  1232. that element is used in the PostScript output.  (If the point size 
  1233. is omitted from the list, the point size of the X font is used).
  1234. Otherwise the X font is examined in an attempt to guess what PostScript 
  1235. font to use.  This works only for fonts whose foundry property is
  1236. \fIAdobe\fR (such as Times, Helvetica, Courier, etc.).  If all of 
  1237. this fails then the font defaults to \fCHelvetica-Bold\fR.
  1238. .TP
  1239. \fB\-landscape \fIboolean\fR
  1240. If \fIboolean\fR is \fCtrue\fR, this specifies the printed area is to 
  1241. be rotated 90 degrees.
  1242. In non-rotated output the \f(BIx\fR axis of the printed area runs along
  1243. the short dimension of the page (``portrait'' orientation);
  1244. in rotated output the \f(BIx\fR axis runs along the long dimension of the
  1245. page (``landscape'' orientation).
  1246. Defaults to \fCfalse\fR.
  1247. .TP
  1248. \fB\-pageanchor \fIanchor\fR
  1249. Specifies which point of the printed area should be appear over
  1250. the positioning point on the page (which is given by the \fB\-pagex\fR
  1251. and \fB\-pagey\fR options).
  1252. For example, \fB\-pageanchor n\fR means that the top center of the
  1253. printed area should be over the positioning point.
  1254. Defaults to \fCnw\fR.
  1255. .TP
  1256. \fB\-pageheight \fIsize\fR
  1257. Specifies that the height of the graph drawn in PostScript.
  1258. The graph is \fInot\fR uniformly scaled since this also scales
  1259. the fonts.  \fISize\fR may be any value accepted by \fBTk_GetPixels\fR.
  1260. The resulting pixel value is then converted to postscript printer
  1261. points.  This means that a height \fI8i\fR will be properly
  1262. converted to 8 inches. This options defaults to the height of the graph window.
  1263. .TP
  1264. \fB\-pagewidth \fIsize\fR
  1265. Specifies that the width of the graph drawn in PostScript.
  1266. The graph is \fInot\fR uniformly scaled since this also scales
  1267. the fonts.  \fISize\fR may be any value accepted by \fBTk_GetPixels\fR.
  1268. The resulting pixel value is then converted to postscript printer
  1269. points.  This means that a width \fI6.5i\fR will be properly
  1270. converted to 6.5 inches. This options defaults to the width of the graph window.
  1271. .TP
  1272. \fB\-pagex \fIposition\fR
  1273. Specifies the x-coordinate of the page positioning point.
  1274. This (with the \fB-pageanchor\fR option) indicates 
  1275. where the graph is placed on the PostScript page.
  1276. \fIPosition\fR may be any value accepted by 
  1277. \fBTk_GetPixels\fR. The resulting pixel value is then converted to 
  1278. postscript printer points.  The default is \fC1i\fR.
  1279. .TP
  1280. \fB\-pagey \fIposition\fR
  1281. Specifies the y-coordinate of the page positioning point.
  1282. This (with the \fB-pageanchor\fR option) indicates 
  1283. where the graph is placed on the PostScript page.
  1284. \fIPosition\fR may be any value accepted by 
  1285. \fBTk_GetPixels\fR. The resulting pixel value is then converted to 
  1286. postscript printer points.  The default is \fC1i\fR.
  1287. .SH BINDINGS
  1288. .PP
  1289. There are no default bindings. 
  1290. .SH BUGS
  1291. .PP
  1292. Auto-scale routines do not use requested min/max limits
  1293. as boundaries when the axis is logarithmically scaled.  
  1294. .PP
  1295. The needs to be a special mapping for undefined log scale values (>= 0.0). 
  1296. Possibly set up a "red zone" of undefined values which divides the 
  1297. positive and negative values.
  1298. .PP
  1299. The PostScript output generated for polygons with more than 1500 points 
  1300. may exceed the limits of some printers (See PostScript Language Reference 
  1301. Manual, page 568).  The work-around is to break the polygon into
  1302. separate pieces.
  1303. .PP
  1304.